package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.AdminJurisdiction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminJurisdictionMapper {
    /**
     * 根据管理员id查询他的角色
     * @param adminId
     * @return
     */
    public List<AdminJurisdiction>AdminJurisdictionList(@Param("adminId") int adminId);

    /**
     * 删除角色
     * @param id
     * @return
     */
    public int delete(@Param("id") int id);

    /**
     * 增加角色
     * @param adminJurisdiction
     * @return
     */
    public int add(AdminJurisdiction adminJurisdiction);

    /**
     * 查询角色是否存在
     * @param roleId
     * @param adminId
     * @return
     */
    public AdminJurisdiction chackRoleId(@Param("roleId") int roleId, @Param("adminId") int adminId);
}
